import get = Reflect.get
import asset from '@/store/modules/asset'

const mixin = {
  methods: {
    cancel() {
      throw new Error("未实现")
    },
    gotoEdit() {
      this.resetClone()
      this.$emit('toggleModel', 'edit')
    },
    val(path: string) {
      if (this.entry === undefined) {
        throw new Error("entry variable must defined for view component")
      }
      let _v = get(this.entry, path, 'N/A')
      return _v || 'N/A'
    }
  },
  data() {
    return {

    }
  }
}

export default mixin